/**
 * 系统应用
 *
 * @author yubaoshan
 * @date 2020/5/26 19:06
 */
import { axios } from '@/utils/request'

/**
 * 登录
 *
 * @author yubaoshan
 * @date 2020/5/26 19:06
 */
export function login (parameter) {
  return axios({
    url: '/login',
    method: 'post',
    data: parameter
  })
}

export function sysTenantList (parameter) {
  return axios({
    url: '/sysTenant/list',
    method: 'post',
    data: parameter
  })
}

/**
 * 登出
 *
 * @author yubaoshan
 * @date 2020/5/26 19:07
 */
export function logout (parameter) {
  return axios({
    url: '/logout',
    method: 'get',
    params: parameter
  })
}
/**
 * 修改密码
 *
 * @author yubaoshan
 * @date 2020/5/26 19:07
 */
export function updatePwd (parameter) {
  return axios({
    url: '/sysUser/updatePwd',
    method: 'post',
    params: parameter
  })
}

/**
 * 获取登录用户信息
 *
 * @author yubaoshan
 * @date 2020/5/26 19:08
 */
export function getLoginUser (parameter) {
  return axios({
    url: '/getLoginUser',
    method: 'post',
    data: parameter
  })
}

/**
 * 获取租户开关
 *
 * @author yubaoshan
 * @date 2020/9/5 1:24
 */
export function getTenantOpen (parameter) {
  return axios({
    url: '/getTenantOpen',
    method: 'get',
    params: parameter
  })
}

/**
 * 获取短信验证码
 *
 * @author yubaoshan
 * @date 2020/5/26 19:29
 */
export function getSmsCaptcha (parameter) {
  return axios({
    url: '/getSmsCaptcha',
    method: 'get',
    params: parameter
  })
}

export function bannerPage (parameter) {
  return axios({
    url: '/banner/page',
    method: 'post',
    data: parameter
  })
}
export function bannerDelete (parameter) {
  return axios({
    url: '/banner/delete',
    method: 'post',
    data: parameter
  })
}
export function bannerEdit (parameter) {
  return axios({
    url: '/banner/edit',
    method: 'post',
    data: parameter
  })
}
export function bannerAdd (parameter) {
  return axios({
    url: '/banner/add',
    method: 'post',
    data: parameter
  })
}
export function getBannerDetail (parameter) {
  return axios({
    url: '/banner/detail',
    method: 'post',
    data: parameter
  })
}
export function agreementPage (parameter) {
  return axios({
    url: '/agreement/page',
    method: 'post',
    data: parameter
  })
}
export function agreementEdit (parameter) {
  return axios({
    url: '/agreement/edit',
    method: 'post',
    data: parameter
  })
}
export function announcementPage (parameter) {
  return axios({
    url: '/announcement/page',
    method: 'get',
    parameter
  })
}
export function announcementAdd (parameter) {
  return axios({
    url: '/announcement/add',
    method: 'post',
    data: parameter
  })
}

export function announcementEdit (parameter) {
  return axios({
    url: '/announcement/edit',
    method: 'post',
    data: parameter
  })
}

export function announcementDelete (parameter) {
  return axios({
    url: '/announcement/delete',
    method: 'post',
    data: parameter
  })
}
export function announcementDetail (parameter) {
  return axios({
    url: '/announcement/detail',
    method: 'get',
    parameter
  })
}

export function appVersionPage (parameter) {
  return axios({
    url: '/appVersion/page',
    method: 'post',
    data: parameter
  })
}
export function appVersionDelete (parameter) {
  return axios({
    url: '/appVersion/delete',
    method: 'post',
    data: parameter
  })
}
export function appVersionAddItem (parameter) {
  return axios({
    url: '/appVersion/addItem',
    method: 'post',
    data: parameter
  })
}
export function appVersionEdit (parameter) {
  return axios({
    url: '/appVersion/edit',
    method: 'post',
    data: parameter
  })
}
export function getAppVersionDetail (parameter) {
  return axios({
    url: '/appVersion/detail',
    method: 'post',
    data: parameter
  })
}